package com.muqi.app.project.utils;

import java.util.ArrayList;
import java.util.List;

import com.muqi.app.qlearn.modles.RecordTypeBean;

public class RecordTypeProvider {
	
	 public static String[] firstLevers = new String[]{
         "活动",
         "获奖",
         "其他"
	 };
	 
	 public static String[] secondLevers = new String[]{
		 "思想品德",
         "学业水平",
         "身心健康",
         "艺术培养",
         "社会实践"
	 };
	 
	 public static String[] thirdLevers = new String[]{
		 "公益劳动",
         "学校党团",
         "民族团结及其他活动",
         
         "必修课程",
         "学业水平",
         "选修课程",
         "研究性学习",
         "学科竞赛",
         
         "体育爱好项目",
         "体育特长项目",
         "体侧成绩",
         "体育比赛",
         
         "艺术活动",
         "艺术活动获奖",
         
         "军事训练",
         "研究性调查",
         "科技活动",
         "创造发明"
	 };
	 
	public static ArrayList<RecordTypeBean> recordTypeLists = getSecondList();
	 
	public static ArrayList<RecordTypeBean> getSecondList() {
		ArrayList<RecordTypeBean> list = new ArrayList<RecordTypeBean>();
		for (int i = 0; i < secondLevers.length; i++) {
			RecordTypeBean item = new RecordTypeBean();
			item.position = i;
			item.name = secondLevers[i];
			List<RecordTypeBean> childList = new ArrayList<RecordTypeBean>();
			switch (i) {
			case 0:
				for(int j=1;j<4;j++){
					RecordTypeBean child = new RecordTypeBean();
					child.position = j;
					child.bigType = "F1";
					child.smallType = "S" + j;
					child.name = thirdLevers[j-1];
					childList.add(child);
				}
				item.childList = childList;
				break;
			case 1:
				RecordTypeBean child = new RecordTypeBean();
				child.position = 8;
				child.bigType = "F2";
				child.smallType = "S5";
				child.name = thirdLevers[7];
				childList.add(child);
				item.childList = childList;
				break;
			case 2:
				RecordTypeBean child1 = new RecordTypeBean();
				child1.position = 10;
				child1.bigType = "F3";
				child1.smallType = "S2";
				child1.name = "体育特长项目";
				childList.add(child1);
				RecordTypeBean child2 = new RecordTypeBean();
				child2.position = 12;
				child2.bigType = "F3";
				child2.smallType = "S4";
				child2.name = "体育比赛";
				childList.add(child2);
				item.childList = childList;
				break;
			case 3:
				RecordTypeBean child3 = new RecordTypeBean();
				child3.position = 13;
				child3.bigType = "F4";
				child3.smallType = "S1";
				child3.name = "艺术活动";
				childList.add(child3);
				RecordTypeBean child4 = new RecordTypeBean();
				child4.position = 14;
				child4.bigType = "F4";
				child4.smallType = "S2";
				child4.name = "艺术活动获奖";
				childList.add(child4);
				item.childList = childList;
				break;
			case 4:
				for(int j=15;j<19;j++){
					RecordTypeBean child5 = new RecordTypeBean();
					child5.position = j;
					child5.bigType = "F5";
					child5.smallType = "S" + (j-14);
					child5.name = thirdLevers[j-1];
					childList.add(child5);
				}
				item.childList = childList;
				break;
			default:
				break;
			}
			list.add(item);
		}
		return list;
	}
	
	public static ArrayList<String> getFirstLeverNames(){
		ArrayList<String> childNames = new ArrayList<String>();
		for(int i=0;i<firstLevers.length;i++){
			childNames.add(firstLevers[i]);
		}
		return childNames;
	}
	
	public static ArrayList<String> getSecondLeverNames(){
		ArrayList<String> childNames = new ArrayList<String>();
		for(int i=0;i<secondLevers.length;i++){
			childNames.add(secondLevers[i]);
		}
		return childNames;
	}
	
	public static ArrayList<String> getThirdLeverNames(int position){
		ArrayList<String> childNames = new ArrayList<String>();
		List<RecordTypeBean> childList = recordTypeLists.get(position).childList;
		for(int i=0;i<childList.size();i++){
			childNames.add(childList.get(i).name);
		}
		return childNames;
	}

}
